package com.navinfo.platform.aero.data.rest.core.enumref;

/**
 * @author : LiYang
 * @description: 汇聚粒度
 * @date 2018/5/2    15:56
 */
public enum ValueType {

    INT(0, "int"),

    STRING(1,"string"),

    DOUBLE(2,"double"),

    LONG(3,"long");

    private int type;
    private String name;

    ValueType(int type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getName() {
        return name;
    }
    public int getType() { return type;}

    public static ValueType getGather(String name) {
        for (ValueType enumGather : values()) {
            if (enumGather.name.equals(name)) {
                return enumGather;
            }
        }
        return ValueType.INT;
    }
}
